#include <iostream>
#include "time.h"
#include "color.h"
#include "assert.h"
#include "shell.h"
#include "map.h"

using namespace std;

#define EMPTY_POINT 0

int main(){
	srand(time(NULL));
	Map m;
	m.initMap(20, 20);
	m.Random(3);
	m.drawMap();
	int x, y, n, tx, ty;
	while(cin>>x>>y>>n>>tx>>ty){
		
		cout<<x<<" "<<y<<" "<<n<<" "<<tx<<" "<<ty<<endl;
		moveTo(m, x, y, n, tx, ty);
		cout<<endl<<endl<<endl;
		m.drawMap();
		
		
		/*
		int value = getPointValue(m, x, y);
		cout<<value<<endl;
		*/
	}
	return 0;
}



